package com.day01.demo1;

import java.util.Arrays;

public class maop {
	public static void main(String[] args) {
		int[] arr = { 1, 3, 4, 2, 5 };
		String s = new StringBuilder(arr.toString()).reverse().toString();
		int a = Integer.parseInt(s);
		System.out.println(a);
		
	}

	public static void method1() {
		int[] arr = { 1, 3, 4, 2, 5 };
		Arrays.sort(arr);
		System.out.println(Arrays.toString(arr));
	}

	public static void method() {
		int[] arr = { 1, 3, 4, 2, 5 };
		for (int j = 0; j < arr.length-1; j++) {
			
			for (int i = 0; i < arr.length - 1-j; i++) {
				if (arr[i] > arr[i + 1]) {
					int temp = arr[i];
					arr[i] = arr[i + 1];
					arr[i + 1] = temp;
				}
			}
		}
		System.out.println(Arrays.toString(arr));
	}
}
